import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login/myIndex')
  },
  {
<<<<<<< HEAD
    path: '/student',
    name: 'student',
    redirect: '/student/dashboard',
    component: () => import('../student/layout/index'),
    children: [
      {
        path: 'dashboard',
        component: () => import('../student/dashboard/index')
      },
      {
        path: 'record',
        component: () => import('../student/record/index')
      },
      {
        path: 'paper',
        component: () => import('../student/paper/index')
      },
      {
        path: 'self',
        component: () => import('@/views/selfdata/index')
      },
      {
        path: 'scheck/:id',
        name: 'sckeck',
        component: () => import('@/views/answer/check')
      },
      {
        path: 'sanswer/:id',
        name: 'sanswer',
        component: () => import('@/student/paper/judge')
      }
    ]
  },
  {
=======
>>>>>>> 7d520118954f103433f5074ad63a16f5b63acf51
    path: '/admin',
    name: '/admin',
    redirect: '/admin/dashboard',
    component: () => import('../layout/myIndex'),
    children: [
      {
        path: 'dashboard',
        component: () => import('../views/dashboard/index.vue')
      },
      { path: 'userlist', component: () => import('@/views/user/userlist') },
      { path: 'adminlist', component: () => import('@/views/user/adminlist') },
      {
        path: 'captainlist',
        component: () => import('@/views/user/captainlist')
      },
      { path: 'subjectlist', component: () => import('@/views/subject/list') },
      { path: 'subjectedit', component: () => import('@/views/subject/edit') },
      {
        path: 'questionlist',
        component: () => import('@/views/question/list')
      },
      {
        path: 'paperlist',
        component: () => import('@/views/paper/list')
      },
      {
        path: 'paperedit',
        component: () => import('@/views/paper/edit')
      },
      { path: 'tasklist', component: () => import('@/views/task/tasklist') },
      { path: 'taskedit', component: () => import('@/views/task/edit') },
      { path: 'messagelist', component: () => import('@/views/message/list') },
      { path: 'editmessage', component: () => import('@/views/message/edit') },
      {
        path: 'singlechoiceedit',
        component: () => import('@/views/question/singleedit')
      },
      {
        path: 'multiplechoiceedit',
        component: () => import('@/views/question/multipleedit')
      },
      {
        path: 'truefalseedit',
        component: () => import('@/views/question/judgeedit')
      },
      {
        path: 'shortansweredit',
        component: () => import('@/views/question/shortansweredit')
      },
      {
        path: 'logdata',
        component: () => import('@/views/logdata/list')
      },

      {
        path: 'waitjudgeanswer',
        component: () => import('@/views/answer/uncorrectlist')
      },
      {
<<<<<<< HEAD
        path: 'overanswer',
        component: () => import('@/views/answer/correctlist')
      },
      {
        path: 'self',
        component: () => import('@/views/selfdata/index')
      },
      {
        path: 'judge/:id',
        name: 'judge',
        component: () => import('@/views/answer/judge')
      },
      {
        path: 'check/:id',
        name: 'ckeck',
        component: () => import('@/views/answer/check')
=======
        path: 'judgedanswer',
        component: () => import('@/views/answer/correctlist')
>>>>>>> 7d520118954f103433f5074ad63a16f5b63acf51
      }
    ]
  },
  {
    path: '/captain',
    name: '/captain',
    redirect: '/captain/dashboard',
    component: () => import('../captainlayout/myIndex'),
    children: [
      {
        path: 'dashboard',
        component: () => import('../captainviews/dashboard/index.vue')
      },
      {
        path: 'userlist',
        component: () => import('@/captainviews/user/userlist')
      },
      {
        path: 'grouplist',
        component: () => import('@/captainviews/group/list')
      },
      {
        path: 'groupedit',
        component: () => import('@/captainviews/group/edit')
      },
      { path: 'subjectlist', component: () => import('@/views/subject/list') },
      { path: 'subjectedit', component: () => import('@/views/subject/edit') },
      {
        path: 'questionlist',
        component: () => import('@/views/question/list')
<<<<<<< HEAD
      },
      {
        path: 'paperlist',
        component: () => import('@/views/paper/list')
      },
      {
        path: 'paperedit',
        component: () => import('@/views/paper/edit')
      },
      {
        path: 'singlechoiceedit',
        component: () => import('@/views/question/singleedit')
      },
      {
        path: 'multiplechoiceedit',
        component: () => import('@/views/question/multipleedit')
      },
      {
        path: 'truefalseedit',
        component: () => import('@/views/question/judgeedit')
      },
      {
        path: 'shortansweredit',
        component: () => import('@/views/question/shortansweredit')
      },
      {
        path: 'questionlist',
        component: () => import('@/views/question/list')
      },
      {
        path: 'waitjudgeanswer',
        component: () => import('@/views/answer/uncorrectlist')
      },
      {
        path: 'overanswer',
        component: () => import('@/views/answer/correctlist')
      },
      {
        path: 'self',
        component: () => import('@/views/selfdata/index')
      },
      {
        path: 'judge/:id',
        name: 'judge',
        component: () => import('@/views/answer/judge')
      },
      {
        path: 'check/:id',
        name: 'ckeck',
        component: () => import('@/views/answer/check')
=======
>>>>>>> 7d520118954f103433f5074ad63a16f5b63acf51
      }
    ]
  }
]

const adminroute = [
  {
    id: '101',
    authername: '用户管理',
    children: [
      { path: '/admin/userlist', authername: '学生列表' },
      { path: '/admin/captainlist', authername: '队长列表' },
      { path: '/admin/adminlist', authername: '管理员列表' }
    ]
  },
  {
    id: '102',
    authername: '学科管理',
    children: [
      { path: '/admin/subjectlist', authername: '学科列表' },
      { path: '/admin/subjectedit', authername: '学科创编' }
    ]
  },
  {
    id: '103',
    authername: '卷库管理',
    children: [
      { path: '/admin/paperlist', authername: '试卷列表' },
      { path: '/admin/paperedit', authername: '试卷创编' }
    ]
  },
  {
    id: '104',
    authername: '题库管理',
    children: [
      { path: '/admin/questionlist', authername: '题目列表' },
      { path: '/admin/singlechoiceedit', authername: '单选题编辑' },
      { path: '/admin/multiplechoiceedit', authername: '多选编辑' },
      { path: '/admin/truefalseedit', authername: '判断编辑' },
      { path: '/admin/shortansweredit', authername: '简答编辑' }
    ]
  },
  {
    id: '105',
    authername: '任务管理',
    children: [
      { path: '/admin/tasklist', authername: '任务列表' },
      { path: '/admin/taskedit', authername: '任务编辑' }
    ]
  },
  {
    id: '106',
    authername: '答卷管理',
    children: [
      { path: '/admin/waitjudgeanswer', authername: '未批改列表' },
<<<<<<< HEAD
      { path: '/admin/overanswer', authername: '已批改列表' }
=======
      { path: '/admin/judgedanswer', authername: '已批改列表' }
>>>>>>> 7d520118954f103433f5074ad63a16f5b63acf51
    ]
  },
  {
    id: '107',
    authername: '消息中心',
    children: [
      { path: '/admin/messagelist', authername: '消息列表' },
      { path: '/admin/editmessage', authername: '消息发送' }
    ]
  },
  {
    id: '108',
    authername: '日志中心',
    children: [{ path: '/admin/logdata', authername: '用户日志' }]
  }
]
const captainroute = [
  {
    id: 101,
    authername: '用户管理',
    children: [{ path: '/captain/userlist', authername: '学生列表' }]
  },
  {
<<<<<<< HEAD
    id: 102,
=======
    id: 103,
>>>>>>> 7d520118954f103433f5074ad63a16f5b63acf51
    authername: '小组管理',
    children: [
      { path: '/captain/grouplist', authername: '小组列表' },
      { path: '/captain/groupedit', authername: '小组创建' }
    ]
<<<<<<< HEAD
  },
  {
    id: 103,
    authername: '卷库管理',
    children: [
      { path: '/captain/paperlist', authername: '试卷列表' },
      { path: '/captain/paperedit', authername: '试卷创编' }
    ]
  },
  {
    id: 104,
    authername: '题库管理',
    children: [
      { path: '/captain/questionlist', authername: '题目列表' },
      { path: '/captain/singlechoiceedit', authername: '单选题编辑' },
      { path: '/captain/multiplechoiceedit', authername: '多选编辑' },
      { path: '/captain/truefalseedit', authername: '判断编辑' },
      { path: '/captain/shortansweredit', authername: '简答编辑' }
    ]
  },
  {
    id: 105,
    authername: '答卷管理',
    children: [
      { path: '/captain/waitjudgeanswer', authername: '未批改列表' },
      { path: '/captain/overanswer', authername: '已批改列表' }
    ]
=======
>>>>>>> 7d520118954f103433f5074ad63a16f5b63acf51
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export { routes, adminroute, captainroute }
export default router
